package com.aorise.model.response;

import com.aorise.model.system.Role;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * @Auther: zhouhao
 * @Date: 2019/5/8
 * @Description: 登录 返回
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LoginUserRes implements Serializable{

    /**
     * 用户ID
     */
    private Integer id;

    @NotBlank(message = "账号不能为空")
    @Length(min = 1,max = 12)
    private String username;

//    @NotNull(message = "身份不能为空,请选择身份",groups = UserService.class)
    /**
     * 用户类型
     */
    private Integer userType;

    private String token;

    /**
     * 角色集合
     */
    private List<Role> roles;
}
